import requests

url = "http://192.168.196.128/apitest/login/"
args = {'username': 'test01', 'password': '123456'}
res = requests.post(url, args)
# actual=res.json() #实际结果
# expect='登录验证成功'  #预期结果
# if expect in actual.values():   #值列表
#     print('测试通过')
# else:
#     print(f'测试失败===预期:{expect}===实际:{actual}')
# 写法2
actual = res.text
expect = '登录验证成功'
if expect in actual:
    print('测试通过')
else:
    print(f'测试失败==预期:{expect}==实际:{actual}')
